<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/bigjo/js/jquery.js"></script>
<script type="text/javascript" src="/bigjo/js/jquery-1.3.2.min.js"></script>
<title>가수 등록창</title>

<script type="text/javascript">
	jQuery.noConflict();
	jQuery(document).ready(function() {
		jQuery.noConflict();
		jQuery("#singerCheck").click(function() {
				var idx = document.URL.indexOf("bigjo");
				var str = document.URL.substring(0, idx + 5);
				
				var singer = jQuery("#singer").val();
				if(singer==null || singer==""){
					alert("가수를 입력하세요");
					return;
				}
				jQuery.ajax({
					url : str + "/searchSinger.ha?singer=" + singer,
				success : function(data) {
					jQuery("#singerList").html(data);
				},
				error : function(request, status, error) {
					alert("code : " + request.status + "\n" + "error : " + error);
				}
			});
		});
	});
</script>
</head>
<body>
	<jsp:include page="/upMenu.main"></jsp:include>

	<div>
		<form action="">
			<table align="center">
				<tr>
					<td align="right">가수 이름</td>
					<td align="left"><input type="text" id="singer" name="singer"
						value=""></td>
					<td align="left"><input type="button" id="singerCheck"
						value="중복 체크"></td>
				</tr>
				<tr>
					<td colspan="3"><div id="singerList"></div></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>